<template>
  <div>
      <van-field label='景点' v-model="name"/>
      <van-button @click="add">添加</van-button>
  </div>
</template>

<script>
export default {
data(){
    return{
        name:''
    }
},
methods:{
    btn(){
        this.axios.get('city').then(res=>{
            console.log(res)
        })
    },
    add(){
        let formdata= new FormData()
        formdata.append('name',this.name)
        this.axios.post('city').then(res=>{
            
        })
        this.btn()
        }
    }
}
</script>

<style>

</style>